{include file='common/head'}
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>会员列表</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="{:url('admin/user/viplist')}" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                <select name="cateid">
                    <option value="">搜索关键词</option>
                    <option value="u_phone">账号</option>
                    <option value="u_name">姓名</option>
                    <option value="jc_user.uid">用户ID</option>
                </select>
            </div>
            <input type="text" name="Key"  placeholder="请输入关键词" autocomplete="off" class="layui-input">
            <span>注册时间</span><input class="layui-input" placeholder="开始日" name="datemin" id="start">至
            <input class="layui-input" placeholder="截止日" name="datemax" id="end">
            <input type="submit" name="sub" class="layui-btn" value="开始搜索" lay-submit="" lay-filter="sreach">
            <!--<a title="查看" href="{:url('admin/user/viplist')}" >
                <span class="layui-btn">导出数据</span>
            </a>-->
        </form>
    </div>
    <table class="layui-table">
        <thead>
        <tr style="text-align: center">
            <th style="text-align: center">NO</th>
            <th style="text-align: center">用户ID</th>
            <th style="text-align: center">账号</th>
            <th style="text-align: center">姓名</th>
            <th style="text-align: center">头像</th>
            <th style="text-align: center">直推</th>
            <th style="text-align: center">信用额度</th>
            <th style="text-align: center">余额</th>
            <th style="text-align: center">信誉分</th>
            {if $Think.session.admin_uid!=1}<th>代理利率</th>{else/}{/if}
            <th style="text-align: center">注册时间</th>
            <th style="text-align: center">操作</th><!--显示12个字-->
        </tr>
        </thead>
        <tbody>
        {volist name="rs" id="rs"}
        <tr style="text-align: center">
            <td>{$key+1}</td>
            <td>{$rs.uid}</td>
            <td>{$rs.u_phone}</td>
            <td>{$rs.u_name}</td>
            <td>{if $rs.u_picture!=''}<img src="/upload/user/head/{$rs.u_picture}" width="50" height="50">{else/}<img src="/upload/picture/20190430143646.png" width="40" height="40">{/if}</td>
            <td>{$rs.u_path}</td>
            <td>{$rs.u_money}</td>
            <td>{$rs.y_money}</td>
            <td>{if $rs.score>0}<span style="color: green;font-weight: 700;">{$rs.score}</span>{else/}<span style="color: red;font-weight: 700;">{$rs.score}</span>{/if}</td>
            {if $Think.session.admin_uid!=1}<td>{$rs.lilv}</td>{else/}{/if}
            <td>{$rs.u_createtime}</td>
            <td class="td-manage">
                <a title="详情" href="javascript:;" attr_id='{$rs.uid}' onclick="banner_edit(this)">
                    <i class="layui-icon">&#xe63c;</i><span style="color: mediumblue">详情</span>
                </a>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page">
        <div>
            {$page}
        </div>
    </div>

</div>
<script>
    function banner_edit(obj){
        var mid=$(obj).attr('attr_id');
        //alert(mid);
        var url="{:Url('admin/user/chakan')}?uid="+  mid;
        // alert(url);
        x_admin_show('详情',url);
    }
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });

    /*用户-停用*/
    function member_stop(obj,id){
        layer.confirm('确认要停用吗？',function(index){

            if($(obj).attr('title')=='启用'){

                //发异步把用户状态进行更改
                $(obj).attr('title','停用')
                $(obj).find('i').html('&#xe62f;');

                $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                layer.msg('已停用!',{icon: 5,time:1000});

            }else{
                $(obj).attr('title','启用')
                $(obj).find('i').html('&#xe601;');

                $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                layer.msg('已启用!',{icon: 5,time:1000});
            }

        });
    }

    /*用户-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }



    function delAll (argument) {

        var data = tableCheck.getData();

        layer.confirm('确认要删除吗？'+data,function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
    }
</script>

</body>

</html>